﻿using KFC.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KFC.MonAnF
{
    public abstract class PhanAn : MonAn
    {
        protected List<string> _dsMaMonAnDon = new List<string>();

        public List<string> DsMaMonAnDon
        {
            get { return _dsMaMonAnDon; }
            set { _dsMaMonAnDon = value; }
        }

        protected List<int> _dsSoLuongMon = new List<int>();

        public List<int> DsSoLuongMon
        {
            get { return _dsSoLuongMon; }
            set { _dsSoLuongMon = value; }
        }

        public override void SetInforFrom(ServiceReferenceKFC.SafeMonAnDTO i)
        {
            base.SetInforFrom(i);

            UtilsXML.readXML(DsMaMonAnDon, DsSoLuongMon, i.ExtraAttributes);
        }

        public override System.Xml.XmlDocument GetExtraAttributes()
        {
            return UtilsXML.PortExAttToXML(DsMaMonAnDon, DsSoLuongMon);
        }
    }
}
